/* Pass off the Multiboot info structure to C land. */
mov multiboot_ptr(%rip),%edi
- lea start-0x100000(%rip),%rax
- add %rax,%rdi
call __start_xen
ud2 /* Force a panic (invalid opcode). */
startup_cpu_idle_loop();
}
-void __init __start_xen(multiboot_info_t *mbi)
+void __init __start_xen(unsigned long mbi_p)
{
char *memmap_type = NULL;
char __cmdline[] = "", *cmdline = __cmdline;
unsigned int initrdidx = 1;
char *_policy_start = NULL;
unsigned long _policy_len = 0;
+ multiboot_info_t *mbi = __va(mbi_p);
module_t *mod = (module_t *)__va(mbi->mods_addr);
unsigned long nr_pages, modules_length;
int i, e820_warn = 0, bytes = 0;
barrier();
move_memory(e, 0, __pa(&_end) - xen_phys_start);
+ /* Poison low 1MB to detect stray pointers to physical 0-1MB. */
+ memset(maddr_to_bootstrap_virt(e), 0x55, 1U<<20);
+
/* Walk initial pagetables, relocating page directory entries. */
pl4e = __va(__pa(idle_pg_table));
for ( i = 0 ; i < L4_PAGETABLE_ENTRIES; i++, pl4e++ )